import BannerService from '../service/banner-service';
import * as Koa from 'koa';

class BannerController {
  private service: BannerService = new BannerService();

  // 添加
  addBanner = async (ctx: Koa.Context) => {
    await this.service.addBanner(ctx);
  };

  // 删除
  delBanner = async (ctx: Koa.Context) => {
    await this.service.delBanner(ctx);
  };

  // 查询
  searchBanner = async (ctx: Koa.Context) => {
    await this.service.searchBanner(ctx);
  };
}

export default new BannerController();
